VB-2012 Random Numbers - introducing one of the best psuedorandom number generators (VB-2012 Programming by Example Book 3) by John Craig

VB-2012 Random Numbers - introducing one of the best psuedorandom number generators (VB-2012 Programming by Example Book 3) by John Craig

Author:John Craig [Craig, John]
Language: eng
Format: azw3
Publisher: Books To Believe In
Published: 2012-02-03T16:00:00+00:00


Demonstrating RandomNumbers

This chapter demonstrates the RandomNumbers class by using it in a program named Randoms. In addition to the RandomNumbers class module, this program has two forms, a main one to let the user select from several demonstrations, and a chart form to display some of the results in a simple graphic form.

The main form

You can create your own code to experiment with the RandomNumbers class, or you can use the program described here to create an interesting demonstration program. Start with a new Windows Forms Application project, name it Randoms, and name its main form FormRandoms. A description of all the controls and properties on this form will follow, but first here's the code for it. Go ahead and add a new button to the main form, change its name to btnGenerate, and double click it to create its click event. Either type in all the following code to this event procedure, or copy and paste the code from the web at the address below. Also add the other supporting procedures in this listing that the button click procedure calls, plus the form load event that runs as this form loads at run time.

http://vb-book.com/source/WZNFCP.php Public Class FormRandoms



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.